<template>
	<view>
		<view class="scan">
			<view class="inputStyle">
				<text>输入核销码：</text>
				<uni-easyinput v-model="value"></uni-easyinput>
			</view>
			<button>识别</button>
		</view>
		<view class="detail" v-if="scanDetail">
			<view class="number">
				核销码 MC-124-9809-FG45
			</view>
			<view class="line"></view>
			<view class="content">
				<view>服务内容</view>
				<text>整车泡沫冲洗擦干
					轮胎轮毂冲洗清洁
					车内吸尘
					内饰脚垫简单除尘
					（不包含虫尸、水泥、沥青和顽固污渍清理等）
				</text>
			</view>
			<view class="line"></view>
			<view class="content">
				<view>订单信息</view>
				<view>订单价格：</view>
				<view>实付金额：</view>
				<view>优惠金额：</view>
				<view>订单编号：</view>
				<view>支付时间：</view>
				<view>预约时间：</view>
			</view>
		</view>
		<button class="btn" v-if="scanDetail" @click="onConfirm">确认核销</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: '',
				scanDetail: true
			}
		},
		methods: {
			onConfirm() {
				uni.showModal({
					title: '是否核销此订单',
					content: '请您仔细核对订单，此操作不可撤销，请谨慎操作',
					confirmText:'核销',
					success: (res) => {
						if (res.confirm) {

						} else {

						}
					}
				})
			}

		}
	}
</script>

<style>
	page {
		background-color: white;
		padding: 20rpx;
	}

	.scan {
		margin: 30rpx 0;
		display: flex;
	}

	.scan button {
		height: 70rpx;
		line-height: 70rpx;
		font-size: 30rpx;
		background-color: #1D6FFF;
		color: white;
		font-weight: bolder;
	}

	.inputStyle {
		display: flex;
		font-weight: bolder;
		width: 80%;
		line-height: 70rpx;
	}

	.detail {
		border: 5rpx solid #E2E2E2;
		border-radius: 20rpx;
		padding: 20rpx;
	}

	.number {
		font-size: 34rpx;
		font-weight: bolder;
		width: 450rpx;
		margin: auto;
	}

	.content {
		margin: 20rpx 0;
	}

	.content view:nth-child(1) {
		font-weight: bolder;
	}

	.line {
		height: 1rpx;
		background-color: #E2E2E2;
		margin: 20rpx 0;
	}

	.btn {
		background-color: #1D6FFF;
		color: white;
		width: 464rpx;
		border-radius: 50rpx;
		margin-top: 50rpx;
		font-size: 32rpx;
	}
</style>